<div class="page-body">
    <a class="btn btn-default purple" href="{:U('export')}" style="margin-bottom: 15px;"><i class="glyphicon glyphicon-cloud-download"></i>
        导出图书
    </a>
    <div class="row">
        <div class="col-xs-12 col-md-12">
            <div class="widget">
                <div class="widget-header ">
                    <span class="widget-caption">图书列表</span>
                    <div class="widget-buttons">
                        <a href="#" data-toggle="maximize">
                            <i class="fa fa-expand"></i>
                        </a>
                        <a href="#" data-toggle="collapse">
                            <i class="fa fa-minus"></i>
                        </a>
                        <a href="#" data-toggle="dispose">
                            <i class="fa fa-times"></i>
                        </a>
                    </div>
                </div>
                <div class="widget-body">
                    <table class="table table-striped table-hover">
                        <thead>
                        <tr>
                            <th>
                                ID
                            </th>
                            <th>
                                条码
                            </th>
                            <th>
                                书名
                            </th>
                            <th>
                                类别
                            </th>
                            <th>
                                定价
                            </th>
                            <th> 库存</th>
                            <th>推荐语</th>
                            <th>所属书包</th>
                            <th></th>
                        </tr>
                        </thead>

                        <tbody>
                        <foreach name="books" item="v">
                            <tr>
                                <td>
                                    {$v.book_id}
                                </td>
                                <td>
                                    条码：{$v.tm}<br>
                                    新华码：{$v.spbs}
                                </td>
                                <td>
                                    <img src="{$v.b_logo}" width="100"><br>
                                    书名：{$v.sm}<br>
                                    作者：{$v.zyz}
                                </td>
                                <td>
                                    <foreach name="v.book_type" item="book_type">
                                        {$book_type.p_name}：{$book_type.name}<br>
                                    </foreach>
                                </td>
                                <td>
                                    {$v.dj}
                                </td>
                                <td>
                                    借：{$v.stock_rent}<br>
                                    卖：{$v.stock_buy}
                                </td>
                                <td>
                                    {$v.b_rec|substr=0,100}
                                </td>
                                <td>{$v.bag_name}</td>
                                <td>
                                    <a class="btn btn-info btn-sm"
                                       href="{:U('replaceBook',array('bag_id'=>$_GET['bag_id'],'bag_book'=>$v['id']))}">
                                        <i class="fa fa-edit"></i> 替换
                                    </a>
                                </td>
                            </tr>
                        </foreach>
                        </tbody>
                    </table>
                    {$page}
                </div>
            </div>
        </div>
    </div>
</div>